﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Configuration;
using System.Data.SqlClient;

/// <summary>
/// Summary description for D_Receipt
/// </summary>
/// 
namespace Bestlife.ERP.DataAccess
{
public class D_Receipt
{

     SqlDataReader rdRStatus;
	public D_Receipt()
	{
		//
		// TODO: Add constructor logic here
		//
	}
    public Boolean inserttoReceipt(Bestlife.ERP.Entities.E_Receipt rcept)
    {
       
        bool ExProduct = false;

        try
        {
            String connStr = ConfigurationManager.ConnectionStrings["MainConnStr"].ConnectionString;
            Bestlife.ERP.DataAccess.clsCon.connect(connStr);
            //store bv n Pvs must insert
            String insert_Receipt = "INSERT INTO Tbl_Receipt(D_id,D_name,Total_Price,Toatal_PV,Total_BV,cashier_Name,Rcpt_Date)VALUES('" + rcept.D_id + "','" + rcept.D_name + "','" + rcept.Total_Price + "','" + rcept.Toatal_PV + "','" + rcept.Total_BV + "','" + rcept.Cashier_name + "','" + rcept.R_date + "')";
            ExProduct = Bestlife.ERP.DataAccess.clsCon.AddEditDel(insert_Receipt);


        }
        catch (Exception ex)
        {

        }
        finally
        {
            clsCon.conn_new.Close();

        }   //finally

        return ExProduct;
    }
}
}